package com.ruoyi.paper.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.paper.mapper.ExamPaperOptionMapper;
import com.ruoyi.paper.domain.ExamPaperOption;
import com.ruoyi.paper.service.IExamPaperOptionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 试卷选项实例Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class ExamPaperOptionServiceImpl implements IExamPaperOptionService 
{
    @Autowired
    private ExamPaperOptionMapper examPaperOptionMapper;

    /**
     * 查询试卷选项实例
     * 
     * @param paperOptionId 试卷选项实例主键
     * @return 试卷选项实例
     */
    @Override
    public ExamPaperOption selectExamPaperOptionByPaperOptionId(String paperOptionId)
    {
        return examPaperOptionMapper.selectExamPaperOptionByPaperOptionId(paperOptionId);
    }

    /**
     * 查询试卷选项实例列表
     * 
     * @param examPaperOption 试卷选项实例
     * @return 试卷选项实例
     */
    @Override
    public List<ExamPaperOption> selectExamPaperOptionList(ExamPaperOption examPaperOption)
    {
        return examPaperOptionMapper.selectExamPaperOptionList(examPaperOption);
    }

    /**
     * 新增试卷选项实例
     * 
     * @param examPaperOption 试卷选项实例
     * @return 结果
     */
    @Override
    public int insertExamPaperOption(ExamPaperOption examPaperOption)
    {
        return examPaperOptionMapper.insertExamPaperOption(examPaperOption);
    }

    /**
     * 修改试卷选项实例
     * 
     * @param examPaperOption 试卷选项实例
     * @return 结果
     */
    @Override
    public int updateExamPaperOption(ExamPaperOption examPaperOption)
    {
        return examPaperOptionMapper.updateExamPaperOption(examPaperOption);
    }

    /**
     * 批量删除试卷选项实例
     * 
     * @param paperOptionIds 需要删除的试卷选项实例主键
     * @return 结果
     */
    @Override
    public int deleteExamPaperOptionByPaperOptionIds(String paperOptionIds)
    {
        return examPaperOptionMapper.deleteExamPaperOptionByPaperOptionIds(Convert.toStrArray(paperOptionIds));
    }

    /**
     * 删除试卷选项实例信息
     * 
     * @param paperOptionId 试卷选项实例主键
     * @return 结果
     */
    @Override
    public int deleteExamPaperOptionByPaperOptionId(String paperOptionId)
    {
        return examPaperOptionMapper.deleteExamPaperOptionByPaperOptionId(paperOptionId);
    }
}
